package com.yanqu.road.server.cmd.activity.oldplayerreturn;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.OldPlayerReturnProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.oldplayerreturn.OldPlayerReturnModule;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_RETURN_PLAYER_GET_FREE_CARD_TIME, desc = "回归玩家领取免费月卡")
public class ReturnPlayerGetFreeCardCmd extends AbstractCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    /**
     * 暂时不用了
     * @param player
     * @param packet
     * @throws Exception
     */
    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        //ret = player.getModule(OldPlayerReturnModule.class).receiveTrialCard();
    }

    @Override
    public void sendData(GamePlayer player) {

//        if (ret != 0) {
//            OldPlayerReturnProto.GetFreeCardRespMsg.Builder builder = OldPlayerReturnProto.GetFreeCardRespMsg.newBuilder();
//            builder.setRet(ret);
//            builder.setGetFreeCardTime(0);
//            player.sendChannelPacket(ClientProtocol.U_RETURN_PLAYER_GET_FREE_CARD_TIME, builder);
//        }
    }
}
